package com.fhz.a2102high6.test2

/**
 * 时间:2023/9/12
 * @author Mr.Feng
 * 简述: TODO
 */
fun main(){

    doStudy(null)

    Study.doHomework13()

}

class Study {

    companion object{
        //静态
        fun doHomework13(){

        }
    }

    fun readBooks(){

    }
    fun doHomework(){

    }
    fun doHomework1(){

    }
    fun doHomework12(){

    }

}

fun doStudy(study: Study?) {
//    study?.readBooks() //调试麻烦
//    study?.doHomework()
//    study?.doHomework1()
//    study?.doHomework12()
//    study?.doHomework13()
    study?.let{
        it.readBooks()
        it.doHomework1()
    }
    if(study !=null){
        val with = with(study) {
            readBooks()
            doHomework()
            this
        }
        with.doHomework()
    }

}